package com.bjc.principle.proxy.demo1;

/**
 * @program: DesignPattern
 * @description:
 * @author: bjc
 * @create: 2020-12-28 19:19
 */
//代理
public class Proxy {

    private Host host;

    public Proxy(Host host){
        this.host = host;
    }

    public void rent(){
        host.rent();
        heTong();
        fare();
    }

    //看房
    public void seeHouse(){
        System.out.println("中介带你去看房");
    }

    //收中介费
    public void fare(){
        System.out.println("收中介费");
    }

    //签合同
    public void heTong(){
        System.out.println("签租赁合同");
    }
}
